<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <meta name="theme-color">
    <meta name="apple-mobile-web-app-capable" content="yes"/>
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <title>分享家</title>
    <link rel="stylesheet" type="text/css" href="../lib/css/api.css"/>
    <link rel="stylesheet" type="text/css" href="../lib/css/mui.css"/>
    <link rel="stylesheet" href="../css/util.css">
    <script src="http://at.alicdn.com/t/font_371407_7omis3wrfr7tx1or.js"></script>
</head>
<link rel="stylesheet" href="../css/discount_coupon.css">
<body>
<header class="fxj-header">
    <back></back>
    <h1 class="fxj-title">优惠券</h1>
</header>
<main id="main">
    <div class="label-btn-group">
        <div class="label-btn" :class="{active:show.unused}" @click="toggleUnused(true)" v-cloak>
            未使用({{data.unusedLength}})
        </div>
        <div class="label-btn line-vertical" :class="{active:!show.unused}" @click="toggleUnused(false)" v-cloak>
            已失效({{data.usedLength}})
        </div>
    </div>
    <section id="content">
        <div class="unused" v-cloak v-show="show.unused">
            <div class="coupon" v-cloak v-for=" coupon of data.unused">
                <div class="left">
                    <span class="highlight">￥<strong v-cloak>{{coupon.amount}}</strong></span>
                    <span class="highlight des">优惠券</span>
                </div>
                <div class="right">
                    <div>优惠券</div>
                    <div class="des" v-cloak>满{{coupon.condition}}元可使用</div>
                    <div class="tips date" v-cloak>{{handleDate(coupon.start_date)}}-{{handleDate(coupon.end_date)}}
                    </div>
                </div>
            </div>
        </div>
        <div class="used" v-cloak v-show="!show.unused" v-for=" coupon of data.used">
            <div class="coupon">
                <div class="left">
                    <span class="highlight">￥<strong v-cloak>{{coupon.amount}}</strong></span>
                    <span class="highlight des">优惠券</span>
                </div>
                <div class="right">
                    <div>优惠券</div>
                    <div class="des" v-cloak>满{{coupon.condition}}元可使用</div>
                    <div class="tips date" v-cloak>{{handleDate(coupon.start_date)}}-{{handleDate(coupon.end_date)}}
                    </div>
                </div>
                <div class="icon-container">
                    <svg class="icon">
                        <use v-if="coupon.used===-1" xlink:href="#icon-yiguoqi"></use>
                        <use v-if="coupon.used===1" xlink:href="#icon-yishiyong"></use>
                    </svg>
                </div>
            </div>
        </div>
    </section>
</main>

<script type="text/javascript" src="../lib/js/babel-polyfill.js"></script>
<script type="text/javascript" src="../lib/js/vue.js"></script>
<script type="text/javascript" src="../lib/js/mui.js"></script>
<script type="text/javascript" src="../lib/js/jquery.js"></script>
<script type="text/javascript" src="../script/util.js"></script>

<script src="../script/discount_coupon.js"></script>
</body>
</html>